{extends file="./main.tpl"}
{block name=head}
<style type="text/css" title="currentStyle">
  @import "./media/css/demo_page.css";
  @import "./media/css/demo_table_jui.css";
  @import "./media/css/jquery-ui-1.8.4.custom.css";
</style>
<script type="text/javascript" language="javascript" src="./media/js/jquery.js"></script>
<script type="text/javascript" language="javascript" src="./media/js/jquery.dataTables.js"></script>
<script type="text/javascript" charset="utf-8">
  $(document).ready(function() 
  {
	  oTable = $('#example').dataTable(
	  {
		  "bJQueryUI": true,
		  "sPaginationType": "full_numbers",
		  "aLengthMenu": [[10, 25, 50, 100, -1], [10, 25, 50, 100, "All"]]
	  });
  });
</script>
<script type="text/javascript">
function myFunction()
{
  if(confirm("You Want To Remove This Record")== true)
	{
		return true;
	}
	else
	{
		return false;
	}
}
</script>
{/block}
{block name=body}
<table align="center" border="2" cellpadding="2" cellspacing="2" width="" >
	<body>
		<tr>
		 <td align="center" class="table1" colspan="10"><b>Loading Invoice</b></td>
		</td>
		<tr>
			<td class="table1"><b>&nbsp;</b></td>
			<td class="table1"><b>FROM</b></td>
			<td class="table1"><b>TO</b></td>
			<td class="table1"><b>Truck No</b></td>
			<td class="table1"><b>Invoice No</b></td>
			<td class="table1"><b>Invoice Date</b></td>
		</tr>
		{section name="sec" loop=$loadingArray}
		<tr>
		<td class="table2" align="center"><a href="loadingDelete.php?loadingInvoiceId={$loadingArray[sec].loadingInvoiceId}" onclick="return myFunction();" class="link"> <img src="./images/deleteIco.png"></a></td>
		<td class="table2" align="center">{$loadingArray[sec].fromName}</td>
		<td class="table2" align="center">{$loadingArray[sec].toName}</td>
		<td class="table2" align="center">{$loadingArray[sec].truckNo}</td>
		<td class="table2" align="center">{$loadingArray[sec].invoiceNo}</td>
		<td class="table2" align="center">{$loadingArray[sec].invoiceDate}</td>
		</tr>
		{/section}
  </body>
</table>
<!--<table align="center" border="2" cellpadding="2" cellspacing="2">
	<body>
		<tr>
		 <td align="center" class="table1" colspan="12"><b>Loading Detail</b></td>
		</td>
		<tr>
			<td class="table1"><b>&nbsp;</b></td>
			<td class="table1"><b>Bill Type</b></td>
			<td class="table1"><b>Lr No</b></td>
			<td class="table1"><b>Lr Date</b></td>
			<td class="table1"><b>Quntitiy</b></td>
			<td class="table1"><b>Discription</b></td>
			<td class="table1"><b>Consignor</b></td>
			<td class="table1"><b>Consignee</b></td>
			<td class="table1"><b>Weight</b></td>
			<td class="table1"><b>Amount</b></td>
			<td class="table1"><b>To Pay</b></td>
			<td class="table1"><b>Remarks</b></td>
		</tr>
		{section name="sec" loop=$loadDetailArray}
		<tr>
		<td class="table2" align="left"><a href="loadingDetailDelete.php?loadingInvoiceDetailId={$loadDetailArray[sec].loadingInvoiceDetailId}&loadingInvoiceId={$loadDetailArray[sec].loadingInvoiceId}" onclick="return myFunction();" class="link"> <img src="./images/deleteIco.png"></a></td>
		<td class="table2" align="left">
	{if $loadDetailArray[sec].billType eq 'wb'}
	 With Bill 
	{else}
	  Without Bill 
	{/if}
	  </td>
		<td class="table2" align="left">{$loadDetailArray[sec].lrNo}</td>
		<td class="table2" align="left">{$loadDetailArray[sec].lrDate|date_format:"%d-%m-%Y"}</td>
		<td class="table2" align="right">{$loadDetailArray[sec].qty}</td>
		<td class="table2" align="left">{$loadDetailArray[sec].discription}</td>
		<td class="table2" align="left">{$loadDetailArray[sec].consignor}</td>
		<td class="table2" align="left">{$loadDetailArray[sec].consignee}</td>
		<td class="table2" align="right">{$loadDetailArray[sec].weight}</td>
		<td class="table2" align="right">{$loadDetailArray[sec].lrAmount}</td>
		<td class="table2" align="left">{$loadDetailArray[sec].toPay}</td>
		<td class="table2" align="left">{$loadDetailArray[sec].remarks}</td>
		</tr>
		{/section}
		<tr>
		<td colspan="8" class="table2"></td>
		<td class="table2"><b>Total Weight : {$totalWeight}</b></td>
		</tr>
  </body>
</table>-->
</form>
<body id="dt_example">
  <div class="demo_jui">
	  <table cellpadding="0" cellspacing="0" border="0" class="display" id="example">
		  <thead>
			  <tr>
				  <th NOWRAP><b>&nbsp;</b></th>
					<th NOWRAP><b>Bill Type</b></th>
					<th NOWRAP><b>Lr No</b></th>
					<th NOWRAP><b>Lr Date</b></th>
					<th NOWRAP><b>Quntitiy</b></th>
					<th NOWRAP><b>Discription</b></th>
					<th NOWRAP><b>Consignor</b></th>
					<th NOWRAP><b>Consignee</b></th>
					<th NOWRAP><b>Weight</b></th>
					<th NOWRAP><b>Amount</b></th>
					<th NOWRAP><b>To Pay</b></th>
					<th NOWRAP><b>Remarks</b></th>
				</tr>
			</thead>
			<tbody>
			  {section name="sec" loop=$loadDetailArray}
					<tr>
					<td align="left"><a href="loadingDetailDelete.php?loadingInvoiceDetailId={$loadDetailArray[sec].loadingInvoiceDetailId}&loadingInvoiceId={$loadDetailArray[sec].loadingInvoiceId}" onclick="return myFunction();" class="link"> <img src="./images/deleteIco.png"></a></td>
					<td align="left">
				{if $loadDetailArray[sec].billType eq 'wb'}
				 With Bill 
				{else}
				  Without Bill 
				{/if}
				  </td>
					<td align="left">{$loadDetailArray[sec].lrNo}</td>
					<td align="left">{$loadDetailArray[sec].lrDate|date_format:"%d-%m-%Y"}</td>
					<td align="right">{$loadDetailArray[sec].qty}</td>
					<td align="left">{$loadDetailArray[sec].discription}</td>
					<td align="left">{$loadDetailArray[sec].consignor}</td>
					<td align="left">{$loadDetailArray[sec].consignee}</td>
					<td align="right">{$loadDetailArray[sec].weight}</td>
					<td align="right">{$loadDetailArray[sec].lrAmount}</td>
					<td align="left">{$loadDetailArray[sec].toPay}</td>
					<td align="left">{$loadDetailArray[sec].remarks}</td>
					</tr>
					{/section}
					<tr>
						<td>&nbsp;</td>
						<td>&nbsp;</td>
						<td>&nbsp;</td>
						<td>&nbsp;</td>
						<td>&nbsp;</td>
						<td>&nbsp;</td>
						<td>&nbsp;</td>
						<td>&nbsp;</td>
						<td align="right"><b>Total Weight : {$totalAll}</b></td>
						<td>&nbsp;</td>
						<td>&nbsp;</td>
						<td>&nbsp;</td>
						</tr>
			</tbody>
		</table>
	</div>
	<div class="spacer"></div>
</body>
{/block}